{% extends 'base.html' %}

{% block meta %}
<meta name="keywords" content="{{ site.keywords }}" />
<meta name="description" content="{{ site.description }}" />
{% endblock %}

{% block title %}{{ page.title }} - {% endblock %}
{% block content %}
<div class="{{ site and site.media and site.media.cls.pagecontainer }}">
<div class="{{ site and site.media and site.media.cls.pagetitle }}">{{ page.title or page.url | e }}</div>
<div class="{{ site and site.media and site.media.cls.pagepublished }}">{{ page.publishedtext }}</div>
{% if page.images %}
<div class="{{ site and site.media and site.media.cls.pageimage }}">
    <div id="carousel1" class="carousel slide" data-interval="3600000">
    {% if page.images|length > 1 %}<ol class="carousel-indicators middle">{% for img in page.images or [] %}
    <li data-target="#carousel1" data-slide-to="{{ loop.index0 }}"{% if loop.first %} class="active"{% endif %}> </li>
    {% endfor %}</ol>{% endif %}
    <div class="carousel-inner">
    {% for img in page.images or [] %}<div class="item{% if loop.first %} active{% endif %}">
    <img style="margin: auto" src="{{ img.url }}" alt="{{ img.title }}"/>
        {% if img.title %}<h5>{{ img.title }}</h5>{% endif %}
    </div>{% endfor %}
    </div>
    {% if page.images|length > 1 %}
    <a class="carousel-control left" href="#carousel1" data-slide="prev">&lsaquo;</a>
    <a class="carousel-control right" href="#carousel1" data-slide="next">&rsaquo;</a>
    {% endif %}
    </div>
</div>{% endif %}
{% for paragraph in page.paragraphs or [] %}
<p class="{{ site and site.media and site.media.cls.pageparagraph }}">{{ paragraph | e }}</p>
{% endfor %}
<p>{{ i18n.origin_link }}: <a href="{{ page.url }}">{{ page.url | e }}</a></p>
<br/>{% if user_admin %}<a href="/test/?url={{ page.url }}">Test</a>{% endif %}
</div>
{% endblock %}

